//
//  ChatCell.h
//  tcpoctest
//
//  Created by gump on 11/8/12.
//  Copyright (c) 2012 gump. All rights reserved.
//

#define NOTIFICATION_VOICE_PRESS   @"NOTIFICATION_VOICE_PRESS"
#define NOTIFICATION_IMG_PRESS   @"NOTIFICATION_IMG_PRESS"
#define NOTIFICATION_CELL_PRESS   @"NOTIFICATION_CELL_PRESS"

@interface ChatCell : UITableViewCell <UIGestureRecognizerDelegate>
{
    int                         cellType;
    
    UIImageView            * avatarImageView;
    UILabel                * timeLabel;
    UILabel                * textView;
    BOOL                     sent;
    UIView                 * messageView;
    UIImageView            * balloonView;
    
    UIImageView            * contentImgView;
    
    UIImageView            * audioControlView;
    NSString               * message;
    UITapGestureRecognizer * singleTouch;
}

@property (nonatomic, readonly)     UIView          *messageView;
@property (nonatomic, strong)       UILabel         *textView;
@property (nonatomic, readonly)     UILabel         *timeLabel;
@property (nonatomic, readonly)     UIImageView     *avatarImageView;
@property (nonatomic, readonly)     UIImageView     *balloonView;
@property (nonatomic, readonly)     UIImageView     *contentImgView;
@property (nonatomic, readonly)     UIImageView     *audioControlView;
@property (nonatomic, strong)       UILabel         *voiceTimeLabel;
@property (assign)                  BOOL            sent;
@property (assign)                  int             cellType;
@property (nonatomic, strong)       NSString        *message;
@property (nonatomic,strong)        UILabel         *StateLabel;//发送状态label
@property                           int             iSection;
@property                           int             iRow;
@property (nonatomic,strong)        ChatContentInfo *ccinfo;

+(CGFloat)textMarginHorizontal;
+(CGFloat)textMarginVertical;
+(CGFloat)maxTextWidth;
+(CGSize)messageSize:(NSString*)message;
+(UIImage*)balloonImage:(BOOL)sent isSelected:(BOOL)selected;
-(id)initMessagingCellWithReuseIdentifier:(NSString*)reuseIdentifier;

@end
